<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link rel="stylesheet" href="file:///android_asset/msg/css/aui.css">
    <title>我的消息</title>
    <script src="file:///android_asset/msg/js/jquery-3.3.1.min.js"></script>
    <script src="file:///android_asset/msg/js/global.js?t=1"></script>
    <style>
        ul li{padding:.8rem 0;border-bottom: 1px solid #eee;}
    </style>
</head>
<body>
<header>
    <a class="f1 head-back"></a>
    <div class="f8">我的信息</div>
    <div class="f1"></div>
</header>
<section>
    <ul id="info" class="pad-l-r-1 ">

    </ul>
</section>



</body>
<script>
    function start(userid,token) {
        localStorage.userid=userid;
        localStorage.token=token;
        auto();
    }
    <!--$(".head-back").on("click",function () {-->
        <!--android.doJsRequest();-->
    <!--});-->
    function auto(){
        var data={};
        new AjaxRequest({
            type: "POST",
            param: data,
            url: hostUrl+"app/message/messagelist",
            dataType: "json",
            isShowLoader: true,
            callBack: function(res){
                if(res.status==1){
                    console.log(res);
                    var page=res.data;
                    var list="";
                    for(var i=0;i<page.length;i++){
                        list+='<li>'+page[i].content+'</li>';

                    }
                    $("#info").append(list);

                    $("#info li").click(function () {
                        var index=$(this).index();
                        var info_id=page[index].id;
                        console.log(info_id);
                        window.location.href='file:///android_asset/msg/myinfodetail.html?info_id='+info_id;
                    })
                }
            },
            error:function (err) {
                console.log(err);
            }
        });
    }
</script>
</html>